﻿@model List<DLULearningNetworkModel.Category>
@using DLULearningNetwork.Libs;
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_BackendLayout.cshtml";
}
@section cssjs
{
    <link href="@Url.Content("~/Content/Pagination.css")" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Scripts/Custom/jsAdminCategories.js"></script>
       
}

<div style="width:500px;min-height:450px;">
<div id="loading" class="loading"> </div>
<p>
    Nhập lĩnh vực mới <input name="newCategory" style="border:1px solid green;height:20px;width:250px;"/> <button name="newCategoryButton" class="button">Tạo mới</button>
</p>
<div id="dataRegion">
<table class="tbl1" id="categoryTable">
    <tr >
        <th style="text-align:center;">
            Tên Lĩnh Vực
        </th>
        <th style="text-align:center;">
            Sửa
        </th>
        <th style="text-align:center;">
            Xóa
        </th>
    </tr>

@for (int i = 0; i < Model.Count;i++ )
{   
    ViewBag.Index = i;
    @Html.Partial("CategoryRow", Model[i])
}

</table>
<div class="pagination pagination-left" style="margin-left: 3px;height:30px;">
    <ul class="pager">
        @Html.Partial("UCPager2", new DLULearningNetwork.ViewModels.PagerViewModel2(ViewBag.TotalItems,
                    Constants.DEFAULT_PAGESIZE,
                    Constants.DEFAULT_NUMBER_OF_ITEMS_PERPAGE,
                    ViewBag.CurrentPage))
    </ul>
</div>
</div>
</div>